import moment from 'moment'

// 中文环境
moment.locale('zh-cn');
export const dateFormat = (date, spe = '/') => {
  return moment(date).format(`YYYY${spe}MM${spe}DD HH:mm:ss`)
}

export const singledateFormat = (date, spe = '/') => {
  return moment(date).format(`YYYY${spe}MM${spe}DD`)
}

// 相对时间
export const offsetdateFormat = (date, spe = '/') => {
  return moment(date).fromNow()
} 